package com.UI;

import java.util.List;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.Model.StudentDBModel;

public class Schedule extends Activity {
    /** Called when the activity is first created. */
		
	List<String> courseTitle, courseInfo;
	

	
	String cNo;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.view_schedule);
    	getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.schedule_title);
    	
    	((TextView)findViewById(R.id.ScheduleTitle)).setText("Schedule");
    	
    	findViewById(R.id.back).setOnClickListener(new OnClickListener() {
    		public void onClick(View v) {
    			Schedule.this.finish();

    		}
    	});
        
        /** Author: Mohammed  */
 

    	
    	StudentDBModel model = new StudentDBModel(this);
    	List<String> records = model.displayCourseSchedule();
    	
    	
    	TextView info =(TextView) this.findViewById(R.id.printcourseInfo);
    	courseInfo = model.displayCourseSchedule();


          
        
        StringBuilder sb = new StringBuilder();
         sb.append("\n");
        
        for (String name : records) {
           sb.append(name + "\n");
         }
        
        info.setText(sb.toString());
        
    }
    
    
    
}   